Skip to content

Add yasuo.js (TypeScript & JavaScript) — modern, zero-dependency Riot Games API client - #224

Merged
stelar7 merged 2 commits into
WxWatch:masterfrom
justadev-afk:library/yasuo-js
Jul 8, 2026
Merged

Add yasuo.js (TypeScript & JavaScript) — modern, zero-dependency Riot Games API client#224
stelar7 merged 2 commits into
WxWatch:masterfrom
justadev-afk:library/yasuo-js

Conversation

@justadev-afk

@justadev-afk justadev-afk commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Add yasuo.js — a modern, zero-dependency Riot Games API client for TypeScript

This PR adds the library to both the TypeScript and JavaScript lists — libraries/typescript/yasuojs.json and libraries/javascript/yasuojs.json. yasuo.js is written in TypeScript but ships a compiled JS + .d.ts build, so it's equally usable from plain JavaScript — same dual-listing pattern as twisted. No existing files are touched.

yasuo.js is the spiritual successor to twisted — same one-client, typed-response ergonomics, rebuilt around a query-builder API with zero runtime dependencies.

Links

📦 npm https://www.npmjs.com/package/yasuo.js
🐙 GitHub https://github.com/justadev-afk/yasuo.js
📚 Docs https://docs.yasuo.gg/
🎮 Live demo https://www.yasuo.gg

Why it belongs here

  • Zero runtime dependencies — nothing pulled into your node_modules (verify: npm view yasuo.js dependencies → empty). Just fully-typed TypeScript.
  • First-class TypeScript — regions, queues, tiers, divisions and match types are enums (no magic strings); errors are typed ApiError subclasses you narrow with instanceof.
  • Query builders + lazy relationsaccount.summoner(region).matchIds().execute() runs only the final request; relations auto-route (e.g. Region.KRRegionGroup.ASIA) so you never re-specify routing.
  • Rate limiting done right — reactive retry-after backoff is always on; opt-in proactive pacing reads Riot's x-app/x-method rate-limit headers and stays under the advertised limits, per host and per method.
  • Pluggable caching — in-memory by default; Redis or Cloudflare Workers KV with no extra dependency.
  • Async-iterator paginationfor await over a player's entire match history, paced by the limiter.
  • Custom transport + axios-style middleware, a leveled logger, and a single-file dual ESM + CJS build (Node 18+ / Bun / Deno).
  • 51 endpoints across LoL (33), TFT (14) and the Riot Account API (4), plus Data Dragon static data.

Live proof it works

www.yasuo.gg is a complete, open-source League of Legends summoner-profile site + public JSON API, built entirely on this library and running on Cloudflare Workers (source). It even ships an interactive playground that shows the exact yasuo.js code behind each lookup.

Entry checklist

  • Files follow the naming rule (repo lowercased, non-alphanumeric stripped) → yasuojs.json, added under both libraries/typescript/ and libraries/javascript/
  • No filename collision in either folder
  • Validates against schema.json (additionalProperties: false satisfied)
  • Includes the v4 tag (also v5) so it surfaces in the docs + #lol-dev
  • rate-limiting tag — the library natively handles rate limiting
  • tft tag — full TFT API support

justadev-afk and others added 2 commits July 7, 2026 10:14
yasuo.js is a modern, fully-typed, zero-dependency Riot Games API client
for TypeScript (LoL, TFT and the Riot Account API) — the evolution of
twisted. Includes npm, GitHub, docs and live-demo links.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yasuo.js ships a compiled JS + .d.ts build, so it's usable from plain
JavaScript too — dual-listed like twisted (language: JavaScript).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@justadev-afk justadev-afk changed the title Add yasuo.js (TypeScript) — modern, zero-dependency Riot Games API client Add yasuo.js (TypeScript & JavaScript) — modern, zero-dependency Riot Games API client Jul 7, 2026
@justadev-afk
justadev-afk marked this pull request as ready for review July 7, 2026 14:24
@stelar7
stelar7 merged commit 2260644 into WxWatch:master Jul 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants